home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
cnet
/
dmitop10.lha
/
DmiTop.REXX
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-06-20
|
8KB
|
256 lines
/*****************
* DMITop v1.0a *
* by *
* Wolverine/DMI *
* (C)1994 DMI *
*****************/
options results
bufferflush
signal on error;signal on ioerr;signal on syntax
changewhere 'DMITop...';BBSIDENTIFY Name;bbsname=result
tr='transmit';ss='sendstring';ls='loadscratch';gs='getscratch'
gu='getuser'
gu 12;date=result
file1='ram:mess';file2='ram:filup';file3='ram:kbup';file4='ram:calls'
file5='ram:fildn';file6='ram:kbdn'
ffile1='ram:smess';ffile2='ram:sfilup';ffile3='ram:skbup';ffile4='ram:scalls'
ffile5='ram:sfildn';ffile6='ram:skbdn';sort='C:QSort';Sopt='DESCEND'
del='c:delete'
startacc=2
endacc=100
CLS
tr ''
tr center('c7z4DMITop v1.0a (C) 1994 by Wolverine / DMIc3z0',91)
tr ''
tr center('c6Reading accounts.....',82)
call open(fil1,file1,'W')
call open(fil2,file2,'W')
call open(fil3,file3,'W')
call open(fil4,file4,'W')
call open(fil5,file5,'W')
call open(fil6,file6,'W')
do i=startacc to endacc
ls i;succ=result
if succ=1 then do
gs 1;handle=result
gs 22;ncall=result
gs 30;upkb=result
gs 31;filup=result
gs 32;dnkb=result
gs 33;fildn=result
gs 36;pubmess=result
call writeln(fil1,right(pubmess,10)' 'left(handle,30))
call writeln(fil2,right(filup,10)' 'left(handle,30))
call writeln(fil3,right(upkb,10)' 'left(handle,30))
call writeln(fil4,right(ncall,10)' 'left(handle,30))
call writeln(fil5,right(fildn,10)' 'left(handle,30))
call writeln(fil6,right(dnkb,10)' 'left(handle,30))
end
end
FinAcc:
call close(fil1)
call close(fil2)
call close(fil3)
call close(fil4)
call close(fil5)
call close(fil6)
tr center('Sorting......',79)
address command sort' 'file1' 'ffile1' 'sopt
address command sort' 'file2' 'ffile2' 'sopt
address command sort' 'file3' 'ffile3' 'sopt
address command sort' 'file4' 'ffile4' 'sopt
address command sort' 'file5' 'ffile5' 'sopt
address command sort' 'file6' 'ffile6' 'sopt
tr center('Sorting complete....Writing data...',79)
call open(fil1,ffile1,'r')
call open(fil2,'GFILES:DMITop/DMITop.Mess','w')
call writeln(fil2,'f1')
call writeln(fil2,center('c6Top Ten Message Writers at c7'bbsname'c6 .Generated with c1DMITopc6.',94))
call writeln(fil2,center('Updated on c7'date'c6.',88))
call writeln(fil2,' ')
call writeln(fil2,center('c7 #c5 :c7 Namec5 :c7 Msgsc5 :',97))
call writeln(fil2,center('-------------------------------------',79))
L=1
MCont:
line=readln(fil1);nmess=word(line,1);handle=substr(line,12,20)
lline='c2'l'c3 'right(handle,23)'c1 'right(nmess,9)
call writeln(fil2,right(lline,66))
if ~eof(fil2) then do
l = l + 1
if l=11 then signal FUWrt
end
signal Mcont
end
FUWRT:
call writeln(fil2,center('c5-------------------------------------',82))
call writeln(fil2,' ')
call writeln(fil2,center('c7z4 DMITop (C)1994 by Wolverine / DMIc3z0 ',91))
call close(fil1);call close(fil2)
call open(fil1,ffile2,'r')
call open(fil2,'GFILES:DMITop/DMITop.FilUp','w')
call writeln(fil2,'f1')
call writeln(fil2,center('c6Top Ten Uploaders in files at c7'bbsname'c6 .Generated with c1DMITopc6.',94))
call writeln(fil2,center('Updated on c7'date'c6.',88))
call writeln(fil2,' ')
call writeln(fil2,center('c7 #c5 :c7 Namec5 :c7 Filesc5 :',97))
call writeln(fil2,center('-------------------------------------',79))
L=1
FUCont:
line=readln(fil1);nmess=word(line,1);handle=substr(line,12,20)
lline='c2'l'c3 'right(handle,23)'c1 'right(nmess,9)
call writeln(fil2,right(lline,66))
if ~eof(fil2) then do
l = l + 1
if l=11 then signal KBUWrt
end
signal FUcont
end
KBUWRT:
call writeln(fil2,center('c5-------------------------------------',82))
call writeln(fil2,' ')
call writeln(fil2,center('c7z4 DMITop (C)1994 by Wolverine / DMIc3z0 ',91))
call close(fil1);call close(fil2)
call open(fil1,ffile3,'r')
call open(fil2,'GFILES:DMITop/DMITop.KBUp','w')
call writeln(fil2,'f1')
call writeln(fil2,center('c6Top Ten Uploaders in Kbytes at c7'bbsname'c6 .Generated with c1DMITopc6.',94))
call writeln(fil2,center('Updated on c7'date'c6.',88))
call writeln(fil2,' ')
call writeln(fil2,center('c7 #c5 :c7 Namec5 :c7 KBc5 :',97))
call writeln(fil2,center('-------------------------------------',79))
L=1
KBUCont:
line=readln(fil1);nmess=word(line,1);handle=substr(line,12,20)
lline='c2'l'c3 'right(handle,23)'c1 'right(nmess,9)
call writeln(fil2,right(lline,66))
if ~eof(fil2) then do
l = l + 1
if l=11 then signal CallWrt
end
signal KBUcont
end
CallWRT:
call writeln(fil2,center('c5-------------------------------------',82))
call writeln(fil2,' ')
call writeln(fil2,center('c7z4 DMITop (C)1994 by Wolverine / DMIc3z0 ',91))
call close(fil1);call close(fil2)
call open(fil1,ffile4,'r')
call open(fil2,'GFILES:DMITop/DMITop.calls','w')
call writeln(fil2,'f1')
call writeln(fil2,center('c6Top Ten Callers at c7'bbsname'c6 .Generated with c1DMITopc6.',94))
call writeln(fil2,center('Updated on c7'date'c6.',88))
call writeln(fil2,' ')
call writeln(fil2,center('c7 #c5 :c7 Namec5 :c7 Callsc5 :',97))
call writeln(fil2,center('-------------------------------------',79))
L=1
CallCont:
line=readln(fil1);nmess=word(line,1);handle=substr(line,12,20)
lline='c2'l'c3 'right(handle,23)'c1 'right(nmess,9)
call writeln(fil2,right(lline,66))
if ~eof(fil2) then do
l = l + 1
if l=11 then signal FdnWrt
end
signal Callcont
end
FDNWrt:
call writeln(fil2,center('c5-------------------------------------',82))
call writeln(fil2,' ')
call writeln(fil2,center('c7z4 DMITop (C)1994 by Wolverine / DMIc3z0 ',91))
call close(fil1);call close(fil2)
call open(fil1,ffile5,'r')
call open(fil2,'GFILES:DMITop/DMITop.FilDN','w')
call writeln(fil2,'f1')
call writeln(fil2,center('c6Top Ten Downloaders in files at c7'bbsname'c6 .Generated with c1DMITopc6.',94))
call writeln(fil2,center('Updated on c7'date'c6.',88))
call writeln(fil2,' ')
call writeln(fil2,center('c7 #c5 :c7 Namec5 :c7 Filesc5 :',97))
call writeln(fil2,center('-------------------------------------',79))
L=1
FDNCont:
line=readln(fil1);nmess=word(line,1);handle=substr(line,12,20)
lline='c2'l'c3 'right(handle,23)'c1 'right(nmess,9)
call writeln(fil2,right(lline,66))
if ~eof(fil2) then do
l = l + 1
if l=11 then signal KBdnWrt
end
signal FDNcont
end
KBdnWRT:
call writeln(fil2,center('c5-------------------------------------',82))
call writeln(fil2,' ')
call writeln(fil2,center('c7z4 DMITop (C)1994 by Wolverine / DMIc3z0 ',91))
call close(fil1);call close(fil2)
call open(fil1,ffile6,'r')
call open(fil2,'GFILES:DMITop/DMITop.KBdn','w')
call writeln(fil2,'f1')
call writeln(fil2,center('c6Top Ten Downloaders in Kbytes at c7'bbsname'c6 .Generated with c1DMITopc6.',94))
call writeln(fil2,center('Updated on c7'date'c6.',88))
call writeln(fil2,' ')
call writeln(fil2,center('c7 #c5 :c7 Namec5 :c7 KB c5 :',97))
call writeln(fil2,center('-------------------------------------',79))
L=1
KBdnCont:
line=readln(fil1);nmess=word(line,1);handle=substr(line,12,20)
lline='c2'l'c3 'right(handle,23)'c1 'right(nmess,9)
call writeln(fil2,right(lline,66))
if ~eof(fil2) then do
l = l + 1
if l=11 then signal Through
end
signal KBdncont
end
Through:
call writeln(fil2,center('c5-------------------------------------',82))
call writeln(fil2,' ')
call writeln(fil2,center('c7z4 DMITop (C)1994 by Wolverine / DMIc3z0 ',91))
call close(fil1);call close(fil2)
logentry ' c2Used c1DMITopc2 to generate TopUser-lists...'
tr center('Deleting temporary files.....c3',82)
tr ''
address command del' 'file1
address command del' 'file2
address command del' 'file3
address command del' 'file4
address command del' 'file5
address command del' 'file6
address command del' 'ffile1
address command del' 'ffile2
address command del' 'ffile3
address command del' 'ffile4
address command del' 'ffile5
address command del' 'ffile6
tr center('c2All done...The data-files containing TopUser-data will be',82)
tr center('in the c1DMITopc2 drawer in your c1GFILES:c2 directory....',91)
tr''
tr center('c7Thank you for using c1DMITopc7.....',88)
exit
ERROR:
tr " An Error"
exit
SYNTAX:
tr "A Syntax Error"
exit
IOERR:
tr " An I/O error"
exit